using System;
using System.Collections.Generic;
using System.Text;

namespace GPSCore
{
    /// <summary>
    /// Rappresent a fisical Path 
    /// </summary>
    public class Path
    {
        #region members

        /// <summary>
        /// it is the position list sotrage for this path
        /// </summary>
        private PositionCollection _positionCollection;

        /// <summary>
        /// The Path Id
        /// </summary>
        private string _pathId;

        #endregion

        #region constructor

        /// <summary>
        /// Base Constructor
        /// </summary>
        public Path()
        { }

        /// <summary>
        /// Create a Path basing on a sequence of Position
        /// </summary>
        /// <param name="PositionSequence"></param>
        public Path(PositionCollection PositionSequence)
        {
            _positionCollection = PositionSequence;        
        }

        /// <summary>
        /// Create a named Path
        /// </summary>
        /// <param name="PathId"></param>
        public Path(string PathId)
        {
            _pathId = PathId;        
        }

        /// <summary>
        /// Create a named and defined path
        /// </summary>
        /// <param name="PathId"></param>
        /// <param name="PositionSequence"></param>
        public Path(string PathId, PositionCollection PositionSequence)
        {
            _pathId = PathId;
            _positionCollection = PositionSequence;  
        }

        #endregion

        #region methods

        /*
        public Distance GetTotalDistance()
        {
            Distance _actualAmount = new Distance();

            foreach (Position currentPosition in _positionCollection)
            { 
                _actualAmount += 
            
            }
        
        }
        */

        #endregion


        #region public properties

        /// <summary>
        /// Get / Set the Path Id
        /// </summary>
        public string PathId
        {
            get { return _pathId; }
            set { _pathId = value; }
        }

        /// <summary>
        /// Get / Set the Collection of Position
        /// </summary>
        public PositionCollection Positions
        {
            get { return _positionCollection; }
            set { _positionCollection = value; }
        }

        #endregion

    }
}